package com.tbit.uqbike.webmanager.dao.history;


import com.baomidou.dynamic.datasource.annotation.DS;
import com.tbit.config.datasource.DataSource;
import com.tbit.uqbike.object.pojo.AlarmDayCount;
import com.tbit.uqbike.object.pojo.NameCount;
import com.tbit.uqbike.object.pojo.TerAlarm;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 终端历史告警dao
 *
 * @author Leon
 * 2017年2月24日 下午4:02:36
 */
@DS(DataSource.HISTORY)
public interface TerAlarmDao {

    /**
     * 根据设备编号和时间查询
     *
     * @param params
     * @return
     */
    List<TerAlarm> getByMachineNOAndTime(Map<String, Object> params);

    /**
     * 获取总数
     *
     * @param params
     * @return
     */
    Integer getTotal(Map<String, Object> params);


    List<NameCount> statAlarmCount(Map<String, Object> map);

    List<AlarmDayCount> statAlarmDetail(Map<String, Object> map);

    List<TerAlarm> queryAlarmInfo(Map<String, Object> map);

    List<TerAlarm> getList(String machineNOs, Integer alarmType, Date startTime, Date endTime);
}
